<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>患者退血入库</title>
    <link rel="shortcut icon" type="image/x-icon" href="../../../../img/favicon.ico">
    <link rel="stylesheet" href="../../../../element-theme/blue/index.css">
    <style type="text/css">
        .tableLimit tr td .cell {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1; /*可以显示的行数，超出部分用...表示 */
            -webkit-box-orient: vertical;
        }

        .el-form-item {
            margin: 20px 20px 0 0;
        }
    </style>
</head>
<body>

<div class="data-manage-table">
    <template>
        <el-form ref="form" :inline="true" style="padding:5px 20px 20px 20px;">
            <el-form-item label="患者退血单号">
                <el-input placeholder="请输入患者退血单号" v-model="pagination.backInformationNumber"></el-input>
            </el-form-item>
            <el-form-item label="患者ID">
                <el-input placeholder="请输入患者ID" v-model="pagination.patientId"></el-input>
            </el-form-item>
            <el-form-item label="输血单号">
                <el-input placeholder="请输入输血单号" v-model="pagination.transfusionNumber"></el-input>
            </el-form-item>
            <el-form-item label="退血原因">
                <el-select v-model="pagination.pBackBloodReason" placeholder="请选择退血原因" clearable filterable
                           @blur="selectBlur" @clear="selectClearBBR" @change="selectChangeBBR">
                    <el-option v-for="(item,index) in backBR" :key="item.code" :label="item.reason"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="申请人工号">
                <el-input placeholder="请输入申请人工号" v-model="pagination.pApplicationNumber"></el-input>
            </el-form-item>
            <el-form-item label="申请时间">
                <el-date-picker v-model="pagination.pDateValApp" size="small" format="yyyy-MM-dd"
                                placeholder="请选择申请时间"></el-date-picker>
            </el-form-item>
            <el-form-item label="审核人工号">
                <el-input placeholder="请输入审核人工号" v-model="pagination.pAuditorNumber"></el-input>
            </el-form-item>
            <el-form-item label="审核时间">
                <el-date-picker v-model="pagination.pDateValAu" size="small" format="yyyy-MM-dd"
                                placeholder="请输入审核时间"></el-date-picker>
            </el-form-item>
            <el-form-item label="退款金额">
                <el-input placeholder="请输入退款金额" v-model="pagination.pRefundAmount"></el-input>
            </el-form-item>
            <el-form-item label="退款完成时间">
                <el-date-picker v-model="pagination.pRefundFinishTime" size="small" format="yyyy-MM-dd"
                                placeholder="请输入退款完成时间"></el-date-picker>
            </el-form-item>
            <el-form-item label="退款操作人工号">
                <el-input placeholder="请输入退款操作人工号" v-model="pagination.pRefundOperatorNumber"></el-input>
            </el-form-item>
            <el-form-item label="收款人身份证号">
                <el-input placeholder="请输入收款人身份证号" v-model="pagination.pPayeeIdCard"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="getData">搜索</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="info" @click="reset">清空</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="danger" @click="batchDownload()">批量下载</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="danger">批量删除</el-button>
            </el-form-item>
        </el-form>

        <el-table ref="backInTable" :data="dataList" style="width: 100%" border
                  :header-cell-style="{'text-align': 'center','background': '#eef1f6'}" highlight-current-row
                  class="tableLimit" @row-click="handle" :cell-style="{'text-align':'center'}">
            <el-table-column type="selection"></el-table-column>
            <el-table-column fixed="left" prop="id" label="ID">
                <template slot-scope="scope">
                    <el-button type="text" @click="showData">{{scope.row.id}}</el-button>
                </template>
            </el-table-column>
            <el-table-column prop="backInformationNumber" label="患者退血单号"></el-table-column>
            <el-table-column prop="patientId" label="患者ID"></el-table-column>
            <el-table-column prop="transfusionNumber" label="输血申请单号"></el-table-column>
            <el-table-column prop="backBloodReason" label="退血原因">
                <template slot-scope="scope">
                    {{getBackBloodReasonName(scope.row.backBloodReason)}}
                </template>
            </el-table-column>
            <el-table-column prop="applicantName" label="申请人姓名"></el-table-column>
            <el-table-column prop="applicantWorkNumber" label="申请人工号"></el-table-column>
            <el-table-column prop="applyTime" label="申请时间"></el-table-column>
            <el-table-column prop="auditor" label="审核人姓名"></el-table-column>
            <el-table-column prop="auditTime" label="审核时间"></el-table-column>
            <el-table-column prop="auditorNumber" label="审核人工号"></el-table-column>
            <el-table-column prop="refundAmount" label="退款金额"></el-table-column>
            <el-table-column prop="refundOperator" label="退款操作人姓名"></el-table-column>
            <el-table-column prop="refundFinishTime" label="退款完成时间"></el-table-column>
            <el-table-column prop="refundOperatorNumber" label="退款操作人工号"></el-table-column>
            <el-table-column prop="payeeName" label="收款人姓名"></el-table-column>
            <el-table-column prop="payeeIdcard" label="收款人身份证号"></el-table-column>
            <el-table-column fixed="right" label="操作" align="center">
                <template slot-scope="scope">
                    <el-button size="mini" type="danger" @click="bloodIn">血液入库</el-button>
                </template>
            </el-table-column>
        </el-table>

        <!--分页组件-->
        <div class="pagination-container">
            <el-pagination
                    class="pagination"
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="pagination.currentPage"
                    :page-sizes="[2,4,6,8,10]"
                    :page-size="pagination.pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="pagination.total"
                    style="text-align: center; margin-top: 20px;">
            </el-pagination>
        </div>

        <el-dialog title="患者退血入库信息" center :visible.sync="sData" width="90%" :close-on-click-modal="false">
            <template>
                <el-descriptions class="margin-top" :column="3" :size="size" border>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退血单号
                        </template>
                        {{shData.sBackInformationNumber}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            创建时间
                        </template>
                        {{shData.sGmtCreate}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            修改时间
                        </template>
                        {{shData.sGmtModified}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            患者ID
                        </template>
                        {{shData.sPatientId}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            输血单号
                        </template>
                        {{shData.sTransfusionNumber}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退血原因
                        </template>
                        {{getBackBloodReasonName(shData.sBackBloodReason)}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            申请人姓名
                        </template>
                        {{shData.sApplicantName}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            申请人工号
                        </template>
                        {{shData.sApplicantWorkNumber}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            申请时间
                        </template>
                        {{shData.sApplyTime}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            审核人姓名
                        </template>
                        {{shData.sAuditor}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            审核人工号
                        </template>
                        {{shData.sAuditorNumber}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            审核时间
                        </template>
                        {{shData.sAuditTime}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退款金额
                        </template>
                        {{shData.sRefundAmount}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退款操作人姓名
                        </template>
                        {{shData.sRefundOperator}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退款完成时间
                        </template>
                        {{shData.sRefundFinishTime}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            退款操作人工号
                        </template>
                        {{shData.sRefundOperatorNumber}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            收款人姓名
                        </template>
                        {{shData.sPayeeName}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                            <i class="el-icon-user"></i>
                            收款人身份证号
                        </template>
                        {{shData.sPayeeIdcard}}
                    </el-descriptions-item>
                </el-descriptions>
            </template>
        </el-dialog>

        <el-dialog title="患者退血入库" center :visible.sync="setData" width="90%" :close-on-click-modal="false">
            <template>
                <el-form :model="ruleForm" ref="ruleForm" label-width="80%" label-position="right" :rules="rules"
                         :inline="true">
                    <template>
                        <el-descriptions class="margin-top" :column="3" :size="size" border>
                            <el-descriptions-item>
                                <template slot="label">
                                    <i class="el-icon-s-order"></i>
                                    退血单号
                                </template>
                                {{backNumber}}
                            </el-descriptions-item>
                            <el-descriptions-item>
                                <template slot="label">
                                    <i class="el-icon-user"></i>
                                    操作人姓名
                                </template>
                                <el-form-item label="" prop="selectName">
                                    <el-select v-model="ruleForm.selectName" placeholder="请选择操作人姓名" @change="opName">
                                        <el-option
                                                v-for="item in nameList"
                                                :key="item.code"
                                                :label="item.name"
                                                :value="item.code"
                                                :disabled="item.disabled"
                                        />
                                    </el-select>
                                </el-form-item>
                            </el-descriptions-item>
                            <el-descriptions-item>
                                <template slot="label">
                                    <i class="el-icon-s-platform"></i>
                                    操作人工号
                                </template>
                                <el-form-item label="" prop="selectName">
                                    <el-input disabled placeholder="请输入操作人工号" v-model="backOperatorNumber"></el-input>
                                </el-form-item>
                            </el-descriptions-item>
                            <el-descriptions-item>
                                <template slot="label">
                                    <i class="el-icon-share"></i>
                                    退血入库时间
                                </template>
                                <el-form-item label="" prop="backFinishTime">
                                    <el-date-picker
                                            v-model="ruleForm.backFinishTime"
                                            type="date"
                                            placeholder="选择日期"
                                            size="small"
                                            format="yyyy-MM-dd">
                                    </el-date-picker>
                                </el-form-item>
                            </el-descriptions-item>
                        </el-descriptions>
                    </template>
                </el-form>
                <div slot="footer" class="dialog-footer" align="center">
                    <el-button @click="cancel()">重 置</el-button>
                    <el-button type="primary" @click="save()">提交</el-button>
                </div>
            </template>
        </el-dialog>
    </template>
</div>
<script src="../../../../plugins/vue-2.6.11/vue.js"></script>
<script src="../../../../plugins/axios-0.27.2/axios.min.js"></script>
<script src="../../../../icons/iconfont.js"></script>
<script src="/js/2.15.12/index.js"></script>
<link href="/css/2.15.12/index.min.css" rel="stylesheet">
<script src="/js/httpVueLoader.js"></script>
<script src="/js/jquery.min.js"></script>
<script>Vue.prototype.$ELEMENT = {size: 'medium'};</script>
<script>(
    function () {
        new Vue({
            el: '.data-manage-table',
            data() {
                return {
                    // 表单校验
                    ruleForm: {
                        selectName: '',
                        backFinishTime: undefined,
                    },
                    rules: {
                        selectName: [
                            {required: true, message: '请选择操作人姓名', trigger: 'change'}
                        ],
                        backFinishTime: [
                            {type: 'date', required: true, message: '请选择日期', trigger: 'change'}
                        ]
                    },
                    //表格信息
                    tableData: [],
                    setData: false,
                    backNumber: undefined,
                    backBackBloodType: undefined,
                    backBackInformation: undefined,
                    backBloodInformation: undefined,
                    backOperator: undefined,
                    backOperatorNumber: undefined,
                    nameList: [
                        {
                            code: '01',
                            name: '张三'
                        },
                        {
                            code: '02',
                            name: '李四'
                        },
                        {
                            code: '03',
                            name: '王五'
                        },
                        {
                            code: '04',
                            name: '赵六'
                        },
                        {
                            code: '05',
                            name: '钱七'
                        },
                        {
                            code: '06',
                            name: '孙八'
                        },
                        {
                            code: '07',
                            name: '周九'
                        },
                        {
                            code: '08',
                            name: '吴十'
                        },
                    ],
                    size: '',
                    user: {
                        "accountNonExpired": true,
                        "accountNonLocked": true,
                        "credentialsNonExpired": true,
                        "enable": false,
                        "enabled": false,
                        "jobnum": "",
                        "menuUrls": {
                            "menu": [{
                                "urls": [{
                                    "id": "11",
                                    "title": "11",
                                    "url": "/pages/error/403.html",
                                    "titleflag": "error"
                                }], "title": "testerror", "titleflag": "error"
                            }, {
                                "urls": [{
                                    "id": "22",
                                    "title": "5-5",
                                    "url": "/pages/error/505.html",
                                    "titleflag": "testerror"
                                }], "title": "testerror2", "titleflag": "testerror"
                            }]
                        },
                        "noLocked": false,
                        "personalization": {
                            "asideFold": false,
                            "mainTabsHeaderFixed": true,
                            "asideControlOpen": false,
                            "headerSkin": "colorful",
                            "headerFixed": false,
                            "skin": "brown",
                            "asideSkin": "dark",
                            "asideControlFixed": true
                        },
                        "username": ""
                    },
                    backReasonList: [],
                    shData: {
                        sBackInformationNumber: "",
                        sTransfusionNumber: "",
                        sGmtCreate: "",
                        sGmtModified: "",
                        sPatientId: "",
                        sBackBloodReason: "",
                        sApplicantName: "",
                        sApplicantWorkNumber: "",
                        sApplyTime: "",
                        sAuditor: "",
                        sAuditorNumber: "",
                        sAuditTime: "",
                        sRefundAmount: "",
                        sRefundOperator: "",
                        sRefundFinishTime: "",
                        sRefundOperatorNumber: "",
                        sPayeeName: "",
                        sPayeeIdcard: "",
                    },
                    sData: false,
                    backBR: [
                        {
                            code: '01',
                            reason: 'ALT升高',
                        },
                        {
                            code: '02',
                            reason: 'HBsAg反应性',
                        },
                        {
                            code: '03',
                            reason: 'HCV抗原抗体联合检测反应性'
                        },
                        {
                            code: '04',
                            reason: 'HIV抗原抗体联合检测反应性'
                        },
                        {
                            code: '05',
                            reason: '梅毒反应性',
                        },
                        {
                            code: '06',
                            reason: '黄疸指数高',
                        },
                        {
                            code: '07',
                            reason: 'ABO血型亚型',
                        },
                        {
                            code: '08',
                            reason: '特殊抗体反应性',
                        },
                        {
                            code: '10',
                            reason: '过期血',
                        },
                        {
                            code: '11',
                            reason: '乳糜血',
                        },
                        {
                            code: '12',
                            reason: '凝块',
                        },
                        {
                            code: '13',
                            reason: '气泡',
                        },
                        {
                            code: '14',
                            reason: '破袋',
                        },
                        {
                            code: '15',
                            reason: '非标量',
                        },
                        {
                            code: '16',
                            reason: '析出',
                        },
                        {
                            code: '17',
                            reason: '保密性弃血',
                        },
                        {
                            code: '18',
                            reason: '标签破损',
                        },
                        {
                            code: '19',
                            reason: 'HIV-DNA检测反应性',
                        },
                        {
                            code: '20',
                            reason: 'HBV-DNA检测反应性',
                        },
                        {
                            code: '21',
                            reason: 'HCV-RNA检测反应性',
                        },
                        {
                            code: '22',
                            reason: '冷凝集',
                        },
                        {
                            code: '23',
                            reason: '溶血',
                        },
                        {
                            code: '24',
                            reason: '脂肪血',
                        },
                        {
                            code: '25',
                            reason: '热合口漏',
                        },
                        {
                            code: '26',
                            reason: '血型错误',
                        },
                        {
                            code: '27',
                            reason: '血小板聚集',
                        },
                        {
                            code: '28',
                            reason: '人为差错',
                        },
                        {
                            code: '99',
                            reason: '其他',
                        },
                    ],
                    //分页相关信息
                    pagination: {
                        currentPage: 1, //当前页码
                        pageSize: 4, //每页显示记录数
                        total: 0, //总记录数
                        // 需要根据查询的条件
                        backInformationNumber: "",
                        patientId: "",
                        transfusionNumber: "",
                        pBackBloodReason: "",
                        pApplicationNumber: "",
                        pDateValApp: "",
                        pAuditorNumber: "",
                        pDateValAu: "",
                        pRefundAmount: "",
                        pRefundFinishTime: "",
                        pRefundOperatorNumber: "",
                        pPayeeIdCard: "",
                    },
                    dataList: [],
                }
            },
            //自动触发写入的函数
            created() {
                this.getData();
            },
            mounted() {
                this.user = sessionStorage.getItem("user") ? JSON.parse(sessionStorage.getItem("user")) : {};
                this.getBackBloodReason();
            },
            methods: {
                getData() {
                    const urlGet = '/bloodcanclepatient/normal/findbackcondition/' + this.pagination.currentPage + '/' + this.pagination.pageSize;
                    axios.get(
                        urlGet,
                        {
                            params: {
                                backInformationNumber: this.pagination.backInformationNumber,
                                patientId: this.pagination.patientId,
                                transfusionNumber: this.pagination.transfusionNumber,
                                backBloodReason: this.pagination.pBackBloodReason,
                                applicantWorkNumber: this.pagination.pApplicationNumber,
                                applyTime: this.pagination.pDateValApp,
                                auditorNumber: this.pagination.pAuditorNumber,
                                auditTime: this.pagination.pDateValAu,
                                refundAmount: this.pagination.pRefundAmount,
                                refundFinishTime: this.pagination.pRefundFinishTime,
                                refundOperatorNumber: this.pagination.pRefundOperatorNumber,
                                payeeIdcard: this.pagination.pPayeeIdCard,
                            }
                        }
                    ).then(
                        res => {
                            if (res.data.code === "200") {
                                this.pagination.pageSize = res.data.data.size;
                                this.pagination.currentPage = res.data.data.current;
                                this.pagination.total = res.data.data.total;
                                this.dataList = res.data.data.records;
                            } else {
                                this.$message.error(res.data.msg);
                            }
                        }
                    )
                },
                // 分页查询 每页显示多少条数据
                handleSizeChange: function (pageSize) {
                    this.pagination.pageSize = pageSize;
                    this.getData()
                },

                //分页查询 切换页码
                handleCurrentChange: function (currentPage) {
                    this.pagination.currentPage = currentPage;
                    //执行查询
                    this.getData()
                },
                // 批量下载
                batchDownload() {
                    if (JSON.parse(JSON.stringify(this.$refs.backInTable.selection)).length == 0) {
                        this.$notify({
                            title: '温馨提示：',
                            message: '您未选中数据，请重新操作！！！',
                            type: 'warning'
                        });
                        return;
                    }
                    let checkArr = JSON.parse(JSON.stringify(this.$refs.backInTable.selection));  // 存储了勾选到的数据
                    var ids = new Array()
                    for (var i = 0; i < checkArr.length; i++) {
                        ids[i] = checkArr[i].id;
                    }
                    // 批量下载
                    this.$confirm('确定下载这些数据吗, 是否继续?', '批量打印', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        const a = document.createElement('a')
                        a.href = '/bloodcanclepatient/normal/batchdownloadpbs?' + 'ids=' + ids
                        a.click()
                    });
                },
                selectBlur(e) {
                    if (e.target.value !== '') {
                        this.pagination.pBackBloodReason = e.target.value;
                        this.$forceUpdate() //强制更新
                    }
                },
                // 清空退血原因
                selectClearBBR() {
                    this.pagination.pBackBloodReason = '';
                    this.$forceUpdate();
                },
                // 输入退血原因
                selectChangeBBR(val) {
                    this.pagination.pBackBloodReason = val;
                    this.$forceUpdate();
                },
                // 获取退血原因字典
                getBackBloodReason() {
                    axios.get('/backbloodreason/normal/query')
                        .then((res) => {
                            if (res.data.code === '200') {
                                this.backReasonList = res.data.data
                            } else {
                                this.$notify.error({
                                    title: '错误',
                                    message: '获取数据失败'
                                })
                            }
                        })
                },
                // 将表格中的BackBloodReason字段的code转换成name
                getBackBloodReasonName(code) {
                    for (let i = 0; i < this.backReasonList.length; i++) {
                        if (this.backReasonList[i].code === code) {
                            return this.backReasonList[i].reason;
                        }
                    }
                },
                opName(val) {
                    let obj = {};//定义对象集合
                    obj = this.nameList.find(item => {
                        return item.code === val; //筛选出匹配数据 返回对象
                    });
                    this.backOperator = obj.name;
                    this.backOperatorNumber = obj.code;
                },
                handle(row) {
                    console.log(row);
                    this.backNumber = row["backInformationNumber"];
                    this.shData.sBackInformationNumber = row["backInformationNumber"];
                    this.shData.sTransfusionNumber = row["transfusionNumber"];
                    this.shData.sGmtCreate = row["gmtCreate"];
                    this.shData.sGmtModified = row["gmtModified"];
                    this.shData.sPatientId = row["patientId"];
                    this.shData.sBackBloodReason = row["backBloodReason"];
                    this.shData.sApplicantName = row["applicantName"];
                    this.shData.sApplicantWorkNumber = row["applicantWorkNumber"];
                    this.shData.sApplyTime = row["applyTime"];
                    this.shData.sAuditor = row["auditor"];
                    this.shData.sAuditorNumber = row["auditorNumber"];
                    this.shData.sAuditTime = row["auditTime"];
                    this.shData.sRefundAmount = row["refundAmount"];
                    this.shData.sRefundOperator = row["refundOperator"];
                    this.shData.sRefundFinishTime = row["refundFinishTime"];
                    this.shData.sRefundOperatorNumber = row["refundOperatorNumber"];
                    this.shData.sPayeeName = row["payeeName"];
                    this.shData.sPayeeIdcard = row["payeeIdcard"];
                },
                reset() {
                    this.pagination.backInformationNumber = "";
                    this.pagination.patientId = "";
                    this.pagination.transfusionNumber = "";
                    this.pagination.pBackBloodReason = "";
                    this.pagination.pApplicationNumber = "";
                    this.pagination.pDateValApp = "";
                    this.pagination.pAuditorNumber = "";
                    this.pagination.pDateValAu = "";
                    this.pagination.pRefundAmount = "";
                    this.pagination.pRefundFinishTime = "";
                    this.pagination.pRefundOperatorNumber = "";
                    this.pagination.pPayeeIdCard = "";
                    this.dataList = undefined;
                    this.getData();
                },
                bloodIn() {
                    this.setData = true;
                },
                save() {
                    this.$refs.ruleForm.validate((valid) => {
                        if (valid) {
                            const params = {};
                            params.backInformationNumber = this.backNumber;
                            params.operator = this.backOperator;
                            params.operatorNumber = this.backOperatorNumber;
                            params.withdrawalStorageTime = this.ruleForm.backFinishTime;
                            axios({
                                method: "post",
                                url: "/bloodcanclepatient/normal/in",
                                data: params,
                                headers: {
                                    'Content-Type': 'application/json;charset=UTF-8'
                                }
                            }).then(res => {
                                console.log(res.data);
                                if (res.data.code === "200") {
                                    this.getData();
                                    this.setData = false;
                                    this.$message.success("退血入库成功");
                                } else {
                                    this.$message.error(res.data.msg);
                                }
                            });
                        } else {
                            console.log('提交有误！');
                            return false;
                        }
                    })
                },
                showData() {
                    this.sData = true;
                },
                //重置按钮
                cancel() {
                    this.$refs.ruleForm.resetFields();
                }
            },
        });
    })()
</script>
<style>
    .el-form-item {
        margin-bottom: 0px;
    }
</style>
</body>
</html>